package com.eric.code.oauth2.common;

import com.eric.code.oauth2.login.LoginService;
import com.eric.code.oauth2.model.User;
import com.jfinal.core.Controller;

/**
 * Created by eric on 17-3-24.
 */
public class BaseController extends Controller{
    public User getLoginUser(){
        return getAttr(LoginService.loginAccountCacheName);
    }

    public String getSessionId(){
        return getCookie(LoginService.sessionIdName);
    }
}
